﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace DP.RecallDeal.Interface.Requests
{
    public sealed class ADPWeOweDealNumberRequest : BaseRequest, IRequest
    {
        static string USERNAME = ConfigurationManager.AppSettings.Get("ADP_USERNAME");
        static string PASSWORD = ConfigurationManager.AppSettings.Get("ADP_PASSWORD");
        static string DEALERID = ConfigurationManager.AppSettings.Get("ADP_DEALERID");

        static string DEAL_NUMBER_REQUEST_URL = "http://staging.dmotorworks.com/pip-extract/we-owe/test";
        const string QUERYID = "WeOweDeal";

        public string DealNo
        {
            set {
                base.Params.Add("qparamDealNo", value);
            }
        }

        public ADPWeOweDealNumberRequest(string dealNo)
            : base(DEAL_NUMBER_REQUEST_URL, new Dictionary<string, string>(), USERNAME, PASSWORD)
        {
            IDictionary<string, string> parameters = new Dictionary<string, string>();
            parameters.Add("queryId", QUERYID);
            parameters.Add("dealerId", DEALERID);
            parameters.Add("qparamDealNo", dealNo);
            base.AddParams(parameters);
        }

        public ADPWeOweDealNumberRequest()
            : base(DEAL_NUMBER_REQUEST_URL, new Dictionary<string, string>(), USERNAME, PASSWORD)
        {
            IDictionary<string, string> parameters = new Dictionary<string, string>();
            parameters.Add("queryId", QUERYID);
            parameters.Add("dealerId", DEALERID);
            base.AddParams(parameters);
        }
    }
}
